<!--
 * @Descripttion:
 * @version: 1.0
 * @Author: wuhao
 * @Date: 2021-10-09 10:04:56
 * @LastEditors: wuhao
 * @LastEditTime: 2021-10-09 10:12:43
-->
<!--鄂汇办页面内容部分-列表模式-->
<template>
  <div class="content">
    <div @click="goUrl(rowData)" v-for="(rowData,i) in rowDataList" class="row row2" :key="rowData+i">
      <div class="titleIcon"><img v-bind:src= "rowData.icon" /></div>
      <div class="text">
        <p>{{rowData.name}}</p>
        <p class="detail">{{rowData.detail}}</p>
      </div>
      <div class="arrowIcon"><img src="../../assets/img/arrow.svg"/></div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "EhbContentRow",
    props: {
      rowDataList: {
        type: Array,
        required: true
      },
      click: {
        type: String,
        required: false
      }
    },
    methods: {
      goUrl(rowData) {
        let url = this.$absoultPath + rowData.url;
        if(rowData.url.indexOf("http")==0){
          url = rowData.url;
        }
        if (this.click) {
          this.$emit(this.click, rowData);
          return;
        }
        ehbAppJssdk.operateWindow.open({
          title: '',
          url: url,
          urlType: 'webPage',
          backRefresh: '0',
          reloadForLogin: '0',
          closeCurrentPage: '0',
          disableScrolling: 'disable',
          pageType: '1',
          pageLevel: '2',
          params: rowData.params
        });
      }
    }
  }
</script>

<style scoped>

</style>
